package com.siddy.bbs.http;

import java.io.IOException;

import android.content.Context;

import com.android.volley.RequestQueue;
import com.android.volley.toolbox.Volley;

public class SiddyRequestDispatcher {

	private Context mContext;
	
	private RequestQueue requestQueue;
	
	private SiddyRequestDispatcher(){
		requestQueue=Volley.newRequestQueue(mContext);
	}
	
	private static SiddyRequestDispatcher DISPATCHER;
	
	public static SiddyRequestDispatcher getSiddyRequestDispatcher(){
		if(DISPATCHER==null){
			DISPATCHER=new SiddyRequestDispatcher();
		}
		return DISPATCHER;
	}
	
	public void doGet(String url,ResponseListener<String> listener) throws IOException{
		requestQueue.add(new SiddyStringGet(url, listener));
		
	}

}
